The present invention relates to an imaging device, an endoscope apparatus, a method for controlling an imaging device, and the like.
An endoscope system having a zoom function has been put to practical use, the endoscope system being configured so that the entire digestive tract (object) is observed on the wide-angle (WIDE) side (normal observation), and part of the digestive tract is observed in a zoom state on the telescopic (TELE) side (zoom observation) by adjusting the angle of view of the objective lens by moving a movable lens.
The endoscope system having a zoom function is normally configured to implement the magnification necessary for zoom observation by moving the movable lens to reduce the angle of view on the TELE side (i.e., increase the optical magnification) while adjusting the focal distance to reduce the best object distance. The term “best object distance” used herein refers to the distance from the end of the objective lens to the object when the image position of the object coincides with the image plane of the image sensor. Since the object can be more closely observed by reducing the best object distance on the TELE side, the magnification during zoom observation can be increased.
On the other hand, since the moving amount of the image position due to the movement of the position of the object increases as the best object distance decreases, the depth of field of the optical system normally becomes shallow. Since the TELE-side depth of field of an endoscope system having a zoom function developed in recent years may be 1 mm or less, it may be difficult for the user to bring the object into focus.
In order to solve the above problem, JP-A-2004-294788 proposes an endoscope system having an autofocus (AF) function (contrast AF function) that calculates a contrast value (i.e., an evaluation value that indicates the degree of in-focus of the image) from a high-frequency component of the image to evaluate the in-focus state, for example. JP-A-10-239579 proposes a video camera having a function (continuous AF function) that calculates a contrast value while wobbling the focus lens to detect the in-focus direction, and cyclically controlling the focus lens so that the focal distance moves in the in-focus direction to continuously bring the object into focus so as to follow the object in a movie.
It is difficult to maintain the distance (object distance) from the end of the objective lens to the object to be constant during zoom observation using an endoscope due to pulsation of the object and the like. Therefore, even if the user has temporarily brought the object into focus using a single AF operation, the object becomes out of focus due to a change in the object distance, and observation by the user is hindered. It is desirable to perform the continuous AF operation (see JP-A-10-239579) in order to solve the above problem. However, when detecting the in-focus direction from the contrast value as disclosed in JP-A-10-239579, it is necessary to minimize a change in angle of view due to the movement of the focus lens in order to acquire a natural image that does not flicker during wobbling. Therefore, when using an optical system that simultaneously adjusts the angle of view and the best object distance by moving the movable lens such as that used for the endoscope system having a zoom function, it is difficult to wobble the movable lens as the focus lens.
The zoom function and the continuous AF operation may be simultaneously implemented by employing an optical system that includes a zoom lens that mainly adjusts the optical magnification, and a focus lens that mainly adjusts the focal distance (e.g., in-focus object plane position (i.e., the position of the object in an in-focus state)) of the optical system, and independently controlling the zoom lens and the focus lens, for example.